<?php

class respuesta extends object_standard {

    protected $id;
  
    protected $descripcion;
    protected $fecha_envio;
    protected $usuario;
    protected $peticion;
    var $components = array();
    var $auxiliars = array();

    public function attributes() {
        return array("id" => array(),  "descripcion" => array(), "fecha_envio" => array(),"usuario" => array("foreign_name"=>"u_c", "foreign" => "usuario", "foreign_attribute" => "username"),"peticion" => array("foreign_name"=>"p_r", "foreign" => "peticion", "foreign_attribute" => "id"));
    }

    public function primary_key() {
        return array("id");
    }

    public function relational_keys($class, $rel_name) {
		switch ($class) {
			case "usuario":
				switch ($rel_name) {
					case "u_c":
						return array("usuario");
						break;
				}
				break;
                        case "peticion":
				switch ($rel_name) {
					case "p_r":
						return array("peticion");
						break;
				}
				break;
			default:
				break;
		}
	}
}

?>